package core.exceptions;

@SuppressWarnings("serial")
public abstract class CompilerException extends RuntimeException {

	public CompilerException(ExceptionFormat eFormat, Object... objs) {
		super(String.format(eFormat.getFormat(), objs));
	}
	
	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof CompilerException)) {
			return false;
		}
		
		CompilerException other = (CompilerException) obj;

		return this.getClass().equals(other.getClass()) && this.getMessage().equals(other.getMessage());
	}
	
}
